<?php 
$test_dizi;
$secenek_dizi;

function init()
{
$baglan=mysql_connect('localhost','admin','aFDqKcV5uN3nSNDn','tegv');
	mysql_unbuffered_query('SET NAMES utf8');
	if (!$baglan)
		{
    		die('Bağlanamadı: ' . mysql_error());
		}

mysql_select_db("tegv",$baglan);
}

function soru()
	{
		$test=mysql_query("select * from sorular");
		$test_dizi=mysql_fetch_array($test);
		$sor=$test_dizi[1];
		$resim=$test_dizi[2];
		$dogru=$test_dizi[3];
		echo "$sor </br> $resim Doğru Cevap:$dogru";
	}

function dogru()
	{
		$test=mysql_query("select * from sorular");
		$test_dizi=mysql_fetch_array($test);
		$dogru=$test_dizi[3];
		echo "$dogru";
	}

function secenek_a()
	{
		$secenek=mysql_query("select * from secenek where soru_id='1'");
		$secenek_dizi=mysql_fetch_array($secenek);
		$a_sec=$secenek_dizi[1];
		$a_resim=$secenek_dizi[2];
		echo "$a_resim </br> $a_sec";
	}
	
function secenek_b()
	{
		$secenek=mysql_query("select * from secenek where soru_id='1'");
		$secenek_dizi=mysql_fetch_array($secenek);
		$b_sec=$secenek_dizi[3];
		$b_resim=$secenek_dizi[4];
		echo "$b_resim </br> $b_sec";
	}

function secenek_c()
	{
		$secenek=mysql_query("select * from secenek where soru_id='1'");
		$secenek_dizi=mysql_fetch_array($secenek);
		$c_sec=$secenek_dizi[5];
		$c_resim=$secenek_dizi[6];
		echo "$c_resim </br> $c_sec";
	}

function secenek_d()
	{
		$secenek=mysql_query("select * from secenek where soru_id='1'");
		$secenek_dizi=mysql_fetch_array($secenek);
		$d_sec=$secenek_dizi[7];
		$d_resim=$secenek_dizi[8];
		echo "$d_resim </br> $d_sec";
	}		

?>